import request from '@/utils/request'

const BASE_URL='/admin/system/sysHouse';

export default{

    getPageList(page,limit,searchObj){
      return request({
            url:`${BASE_URL}/${page}/${limit}`,
            method:'get',
            params:searchObj
        })
    },
    //修改前查询当前id的房屋数据
    getHouseById(id){

        return request({
            url:`${BASE_URL}/finHouseById/${id}`,
            method:'get',
        })
    },

    //修改房屋
    updateHouse(sysHouse){
        return request({
            url:`${BASE_URL}/updateHouse`,
            method:'post',
            data:sysHouse
        })
    },


    //添加房屋
    addHouse(sysHouse){
        return request({
            url:`${BASE_URL}/addHouse`,
            method:'post',
            data:sysHouse
        })
    },
    //删除房屋
    removeById(id){
        return request({
            url:`${BASE_URL}/removeHouseById/${id}`,
            method:'get'
        })
    }
}